﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using MoreMountains.Tools;

public class BattleResRef : MMSingleton<BattleResRef>
{
    public Sprite[] sprteData;
    /// <summary>
    /// 根据名字找Sprite
    /// </summary>
    /// <param name="spriteName"></param>
    /// <returns></returns>
    public Sprite GetSpriteByName(string spriteName)
    {
        foreach (var i in sprteData)
        {
            if (i.name == spriteName)
            {
                return i;
            }
        }
        return sprteData[0];
    }

}
